package com.ruiysoft.entity.mdse;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * <p>
 * 商品spu规则值表
 * </p>
 *
 * @author liyahui
 * @since 2018-10-27
 */
@TableName("merchandise_rule_value")
public class MerchandiseRuleValue extends Model<MerchandiseRuleValue> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商铺id
     */
    private Long shopid;

    /**
     * 规则名
     */
    @TableField("rule_name")
    private String ruleName;

    /**
     * 商品spuid
     */
    @TableField("spu_id")
    private Long spuId;

    /**
     * 规则值
     */
    @TableField("rule_value")
    private String ruleValue;

    /**
     * 是否使用(0,可用1,未使用)
     */
    @TableField("is_use")
    private Integer isUse;

    public Long getId() {
        return id;
    }

    public MerchandiseRuleValue setId(Long id) {
        this.id = id;
        return this;
    }
    public Long getShopid() {
        return shopid;
    }

    public MerchandiseRuleValue setShopid(Long shopid) {
        this.shopid = shopid;
        return this;
    }
    public String getRuleName() {
        return ruleName;
    }

    public MerchandiseRuleValue setRuleName(String ruleName) {
        this.ruleName = ruleName;
        return this;
    }
    public Long getSpuId() {
        return spuId;
    }

    public MerchandiseRuleValue setSpuId(Long spuId) {
        this.spuId = spuId;
        return this;
    }
    public String getRuleValue() {
        return ruleValue;
    }

    public MerchandiseRuleValue setRuleValue(String ruleValue) {
        this.ruleValue = ruleValue;
        return this;
    }
    public Integer getIsUse() {
        return isUse;
    }

    public MerchandiseRuleValue setIsUse(Integer isUse) {
        this.isUse = isUse;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "MerchandiseRuleValue{" +
        "id=" + id +
        ", shopid=" + shopid +
        ", ruleName=" + ruleName +
        ", spuId=" + spuId +
        ", ruleValue=" + ruleValue +
        ", isUse=" + isUse +
        "}";
    }
}
